#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;

int n;
int LeiJia;

int Fun(int x)
{
    if (x % 2 == 0)
    {
        return x / 2;
    }
    else
    {
        return (3 * x + 1) / 2;
    }
}
int main()
{
    cin >> n;
    LeiJia = 0;
    while (n != 1)
    {
        n = Fun(n);
        LeiJia++;
    }
    cout << LeiJia;
}
